.class public Lrexsee/network/RexseeSocket;
.super Ljava/lang/Object;
.source "RexseeSocket.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# static fields
.field private static final INTERFACE_NAME:Ljava/lang/String; = "Socket"


# instance fields
.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private final mClients:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Lrexsee/network/SocketClient;",
            ">;"
        }
    .end annotation
.end field

.field private mConnectTimeout:I

.field private mReadingCycle:I

.field private final mServers:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Lrexsee/network/SocketServer;",
            ">;"
        }
    .end annotation
.end field

.field private final onConnected:Lrexsee/network/SocketAbstractClass$SocketConnectedListener;

.field private final onFailed:Lrexsee/network/SocketAbstractClass$SocketFailedListener;

.field private final onLost:Lrexsee/network/SocketAbstractClass$SocketLostListener;

.field private final onRead:Lrexsee/network/SocketAbstractClass$SocketDataListener;

.field private final onStarted:Lrexsee/network/SocketAbstractClass$SocketStartedListener;

.field private final onWrite:Lrexsee/network/SocketAbstractClass$SocketDataListener;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 2
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 81
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 37
    new-instance v0, Lrexsee/network/RexseeSocket$1;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeSocket$1;-><init>(Lrexsee/network/RexseeSocket;)V

    iput-object v0, p0, Lrexsee/network/RexseeSocket;->onStarted:Lrexsee/network/SocketAbstractClass$SocketStartedListener;

    .line 43
    new-instance v0, Lrexsee/network/RexseeSocket$2;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeSocket$2;-><init>(Lrexsee/network/RexseeSocket;)V

    iput-object v0, p0, Lrexsee/network/RexseeSocket;->onFailed:Lrexsee/network/SocketAbstractClass$SocketFailedListener;

    .line 49
    new-instance v0, Lrexsee/network/RexseeSocket$3;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeSocket$3;-><init>(Lrexsee/network/RexseeSocket;)V

    iput-object v0, p0, Lrexsee/network/RexseeSocket;->onConnected:Lrexsee/network/SocketAbstractClass$SocketConnectedListener;

    .line 55
    new-instance v0, Lrexsee/network/RexseeSocket$4;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeSocket$4;-><init>(Lrexsee/network/RexseeSocket;)V

    iput-object v0, p0, Lrexsee/network/RexseeSocket;->onLost:Lrexsee/network/SocketAbstractClass$SocketLostListener;

    .line 61
    new-instance v0, Lrexsee/network/RexseeSocket$5;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeSocket$5;-><init>(Lrexsee/network/RexseeSocket;)V

    iput-object v0, p0, Lrexsee/network/RexseeSocket;->onRead:Lrexsee/network/SocketAbstractClass$SocketDataListener;

    .line 67
    new-instance v0, Lrexsee/network/RexseeSocket$6;

    invoke-direct {v0, p0}, Lrexsee/network/RexseeSocket$6;-><init>(Lrexsee/network/RexseeSocket;)V

    iput-object v0, p0, Lrexsee/network/RexseeSocket;->onWrite:Lrexsee/network/SocketAbstractClass$SocketDataListener;

    .line 75
    const/16 v0, 0x64

    iput v0, p0, Lrexsee/network/RexseeSocket;->mReadingCycle:I

    .line 76
    const/16 v0, 0x2710

    iput v0, p0, Lrexsee/network/RexseeSocket;->mConnectTimeout:I

    .line 82
    iput-object p1, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    .line 83
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    .line 84
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lrexsee/network/RexseeSocket;->mClients:Ljava/util/HashMap;

    .line 85
    iget-object v0, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v0, :cond_0

    .line 86
    iget-object v0, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onSocketStarted"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 87
    iget-object v0, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onSocketFailed"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 88
    iget-object v0, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onSocketConnected"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 89
    iget-object v0, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onSocketLost"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 90
    iget-object v0, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onSocketRead"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 91
    iget-object v0, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onSocketWrite"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 93
    :cond_0
    return-void
.end method

.method static synthetic access$0(Lrexsee/network/RexseeSocket;)Lrexsee/core/browser/Browser;
    .locals 1

    .prologue
    .line 74
    iget-object v0, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    return-object v0
.end method


# virtual methods
.method public addClient(Ljava/lang/String;ILjava/lang/String;I)Z
    .locals 16
    .param p1, "clientId"    # Ljava/lang/String;
    .param p2, "localPort"    # I
    .param p3, "remoteIp"    # Ljava/lang/String;
    .param p4, "remotePort"    # I

    .prologue
    .line 192
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->mClients:Ljava/util/HashMap;

    move-object v4, v0

    move-object v0, v4

    move-object/from16 v1, p1

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 193
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    move-object v4, v0

    if-eqz v4, :cond_0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    move-object v4, v0

    invoke-virtual/range {p0 .. p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v5

    const-string v6, "Duplicated client id."

    invoke-virtual {v4, v5, v6}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 194
    :cond_0
    const/4 v4, 0x0

    .line 217
    :goto_0
    return v4

    .line 196
    :cond_1
    invoke-static {}, Lrexsee/network/RexseeNetwork;->getInetAddress()Ljava/net/InetAddress;

    move-result-object v14

    .line 197
    .local v14, "addr":Ljava/net/InetAddress;
    if-nez v14, :cond_3

    .line 198
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    move-object v4, v0

    if-eqz v4, :cond_2

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    move-object v4, v0

    invoke-virtual/range {p0 .. p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v5

    const-string v6, "Local address is not available."

    invoke-virtual {v4, v5, v6}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 199
    :cond_2
    const/4 v4, 0x0

    goto :goto_0

    .line 201
    :cond_3
    new-instance v5, Ljava/net/InetSocketAddress;

    move-object v0, v5

    move-object v1, v14

    move/from16 v2, p2

    invoke-direct {v0, v1, v2}, Ljava/net/InetSocketAddress;-><init>(Ljava/net/InetAddress;I)V

    .line 204
    .local v5, "localAddress":Ljava/net/InetSocketAddress;
    :try_start_0
    new-instance v6, Ljava/net/InetSocketAddress;

    invoke-static/range {p3 .. p3}, Ljava/net/InetAddress;->getByName(Ljava/lang/String;)Ljava/net/InetAddress;

    move-result-object v4

    move-object v0, v6

    move-object v1, v4

    move/from16 v2, p4

    invoke-direct {v0, v1, v2}, Ljava/net/InetSocketAddress;-><init>(Ljava/net/InetAddress;I)V
    :try_end_0
    .catch Ljava/net/UnknownHostException; {:try_start_0 .. :try_end_0} :catch_0

    .line 210
    .local v6, "remoteAddress":Ljava/net/InetSocketAddress;
    :try_start_1
    new-instance v3, Lrexsee/network/SocketClient;

    move-object/from16 v0, p0

    iget v0, v0, Lrexsee/network/RexseeSocket;->mConnectTimeout:I

    move v7, v0

    move-object/from16 v0, p0

    iget v0, v0, Lrexsee/network/RexseeSocket;->mReadingCycle:I

    move v8, v0

    move-object/from16 v4, p1

    invoke-direct/range {v3 .. v8}, Lrexsee/network/SocketClient;-><init>(Ljava/lang/String;Ljava/net/InetSocketAddress;Ljava/net/InetSocketAddress;II)V

    .line 211
    .local v3, "client":Lrexsee/network/SocketClient;
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->onStarted:Lrexsee/network/SocketAbstractClass$SocketStartedListener;

    move-object v8, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->onFailed:Lrexsee/network/SocketAbstractClass$SocketFailedListener;

    move-object v9, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->onConnected:Lrexsee/network/SocketAbstractClass$SocketConnectedListener;

    move-object v10, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->onLost:Lrexsee/network/SocketAbstractClass$SocketLostListener;

    move-object v11, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->onRead:Lrexsee/network/SocketAbstractClass$SocketDataListener;

    move-object v12, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->onWrite:Lrexsee/network/SocketAbstractClass$SocketDataListener;

    move-object v13, v0

    move-object v7, v3

    invoke-virtual/range {v7 .. v13}, Lrexsee/network/SocketClient;->setListeners(Lrexsee/network/SocketAbstractClass$SocketStartedListener;Lrexsee/network/SocketAbstractClass$SocketFailedListener;Lrexsee/network/SocketAbstractClass$SocketConnectedListener;Lrexsee/network/SocketAbstractClass$SocketLostListener;Lrexsee/network/SocketAbstractClass$SocketDataListener;Lrexsee/network/SocketAbstractClass$SocketDataListener;)V

    .line 212
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->mClients:Ljava/util/HashMap;

    move-object v4, v0

    move-object v0, v4

    move-object/from16 v1, p1

    move-object v2, v3

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 213
    invoke-virtual {v3}, Lrexsee/network/SocketClient;->start()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    .line 214
    const/4 v4, 0x1

    goto :goto_0

    .line 205
    .end local v3    # "client":Lrexsee/network/SocketClient;
    .end local v6    # "remoteAddress":Ljava/net/InetSocketAddress;
    :catch_0
    move-exception v4

    move-object v15, v4

    .line 206
    .local v15, "e":Ljava/net/UnknownHostException;
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    move-object v4, v0

    if-eqz v4, :cond_4

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    move-object v4, v0

    invoke-virtual/range {p0 .. p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v5

    .end local v5    # "localAddress":Ljava/net/InetSocketAddress;
    const-string v6, "Remote address is not available."

    invoke-virtual {v4, v5, v6}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 207
    :cond_4
    const/4 v4, 0x0

    goto/16 :goto_0

    .line 215
    .end local v15    # "e":Ljava/net/UnknownHostException;
    .restart local v5    # "localAddress":Ljava/net/InetSocketAddress;
    .restart local v6    # "remoteAddress":Ljava/net/InetSocketAddress;
    :catch_1
    move-exception v4

    move-object v15, v4

    .line 216
    .local v15, "e":Ljava/lang/Exception;
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    move-object v4, v0

    if-eqz v4, :cond_5

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    move-object v4, v0

    invoke-virtual/range {p0 .. p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v5

    .end local v5    # "localAddress":Ljava/net/InetSocketAddress;
    invoke-virtual {v4, v5, v15}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    .line 217
    :cond_5
    const/4 v4, 0x0

    goto/16 :goto_0
.end method

.method public addServer(Ljava/lang/String;II)Z
    .locals 12
    .param p1, "serverId"    # Ljava/lang/String;
    .param p2, "port"    # I
    .param p3, "backlog"    # I

    .prologue
    .line 170
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v1, p1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 171
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v2

    const-string v3, "Duplicated server id."

    invoke-virtual {v1, v2, v3}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 172
    :cond_0
    const/4 v1, 0x0

    .line 188
    :goto_0
    return v1

    .line 174
    :cond_1
    invoke-static {}, Lrexsee/network/RexseeNetwork;->getInetAddress()Ljava/net/InetAddress;

    move-result-object v10

    .line 175
    .local v10, "addr":Ljava/net/InetAddress;
    if-nez v10, :cond_3

    .line 176
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v1, :cond_2

    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v2

    const-string v3, "Local address is not available."

    invoke-virtual {v1, v2, v3}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 177
    :cond_2
    const/4 v1, 0x0

    goto :goto_0

    .line 179
    :cond_3
    new-instance v2, Ljava/net/InetSocketAddress;

    invoke-direct {v2, v10, p2}, Ljava/net/InetSocketAddress;-><init>(Ljava/net/InetAddress;I)V

    .line 181
    .local v2, "localAddress":Ljava/net/InetSocketAddress;
    :try_start_0
    new-instance v0, Lrexsee/network/SocketServer;

    const/4 v4, -0x1

    iget v5, p0, Lrexsee/network/RexseeSocket;->mReadingCycle:I

    move-object v1, p1

    move v3, p3

    invoke-direct/range {v0 .. v5}, Lrexsee/network/SocketServer;-><init>(Ljava/lang/String;Ljava/net/InetSocketAddress;III)V

    .line 182
    .local v0, "server":Lrexsee/network/SocketServer;
    iget-object v4, p0, Lrexsee/network/RexseeSocket;->onStarted:Lrexsee/network/SocketAbstractClass$SocketStartedListener;

    iget-object v5, p0, Lrexsee/network/RexseeSocket;->onFailed:Lrexsee/network/SocketAbstractClass$SocketFailedListener;

    iget-object v6, p0, Lrexsee/network/RexseeSocket;->onConnected:Lrexsee/network/SocketAbstractClass$SocketConnectedListener;

    iget-object v7, p0, Lrexsee/network/RexseeSocket;->onLost:Lrexsee/network/SocketAbstractClass$SocketLostListener;

    iget-object v8, p0, Lrexsee/network/RexseeSocket;->onRead:Lrexsee/network/SocketAbstractClass$SocketDataListener;

    iget-object v9, p0, Lrexsee/network/RexseeSocket;->onWrite:Lrexsee/network/SocketAbstractClass$SocketDataListener;

    move-object v3, v0

    invoke-virtual/range {v3 .. v9}, Lrexsee/network/SocketServer;->setListeners(Lrexsee/network/SocketAbstractClass$SocketStartedListener;Lrexsee/network/SocketAbstractClass$SocketFailedListener;Lrexsee/network/SocketAbstractClass$SocketConnectedListener;Lrexsee/network/SocketAbstractClass$SocketLostListener;Lrexsee/network/SocketAbstractClass$SocketDataListener;Lrexsee/network/SocketAbstractClass$SocketDataListener;)V

    .line 183
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v1, p1, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 184
    invoke-virtual {v0}, Lrexsee/network/SocketServer;->start()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 185
    const/4 v1, 0x1

    goto :goto_0

    .line 186
    .end local v0    # "server":Lrexsee/network/SocketServer;
    :catch_0
    move-exception v1

    move-object v11, v1

    .line 187
    .local v11, "e":Ljava/lang/Exception;
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v1, :cond_4

    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v2

    .end local v2    # "localAddress":Ljava/net/InetSocketAddress;
    invoke-virtual {v1, v2, v11}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    .line 188
    :cond_4
    const/4 v1, 0x0

    goto :goto_0
.end method

.method public containsSocketInServer(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 8
    .param p1, "serverId"    # Ljava/lang/String;
    .param p2, "index"    # Ljava/lang/String;

    .prologue
    const-wide/16 v3, -0x1

    const/4 v7, 0x0

    .line 133
    invoke-static {p2, v3, v4}, Lrexsee/core/utilities/Utilities;->getLong(Ljava/lang/String;J)J

    move-result-wide v1

    .line 134
    .local v1, "socketIndex":J
    cmp-long v3, v1, v3

    if-nez v3, :cond_1

    .line 135
    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v3, :cond_0

    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v4

    const-string v5, "Invalid socket index."

    invoke-virtual {v3, v4, v5}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    :cond_0
    move v3, v7

    .line 143
    :goto_0
    return v3

    .line 138
    :cond_1
    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v3, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lrexsee/network/SocketServer;

    .line 139
    .local v0, "server":Lrexsee/network/SocketServer;
    if-nez v0, :cond_3

    .line 140
    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v3, :cond_2

    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v4

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "Server #"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, " is not found."

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    :cond_2
    move v3, v7

    .line 141
    goto :goto_0

    .line 143
    :cond_3
    invoke-virtual {v0, v1, v2}, Lrexsee/network/SocketServer;->contains(J)Z

    move-result v3

    goto :goto_0
.end method

.method public getClientIds()Ljava/lang/String;
    .locals 1

    .prologue
    .line 120
    iget-object v0, p0, Lrexsee/network/RexseeSocket;->mClients:Ljava/util/HashMap;

    invoke-virtual {v0}, Ljava/util/HashMap;->keySet()Ljava/util/Set;

    move-result-object v0

    invoke-static {v0}, Lrexsee/core/utilities/Json;->toJson(Ljava/util/Set;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getConnectTimeout()I
    .locals 1

    .prologue
    .line 101
    iget v0, p0, Lrexsee/network/RexseeSocket;->mConnectTimeout:I

    return v0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 0
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 30
    return-object p0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 26
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "Socket"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 34
    new-instance v0, Lrexsee/network/RexseeSocket;

    invoke-direct {v0, p1}, Lrexsee/network/RexseeSocket;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getNumberOfClients()I
    .locals 1

    .prologue
    .line 114
    iget-object v0, p0, Lrexsee/network/RexseeSocket;->mClients:Ljava/util/HashMap;

    invoke-virtual {v0}, Ljava/util/HashMap;->size()I

    move-result v0

    return v0
.end method

.method public getNumberOfServers()I
    .locals 1

    .prologue
    .line 111
    iget-object v0, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v0}, Ljava/util/HashMap;->size()I

    move-result v0

    return v0
.end method

.method public getReadingCycle()I
    .locals 1

    .prologue
    .line 107
    iget v0, p0, Lrexsee/network/RexseeSocket;->mReadingCycle:I

    return v0
.end method

.method public getServerIds()Ljava/lang/String;
    .locals 1

    .prologue
    .line 117
    iget-object v0, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v0}, Ljava/util/HashMap;->keySet()Ljava/util/Set;

    move-result-object v0

    invoke-static {v0}, Lrexsee/core/utilities/Json;->toJson(Ljava/util/Set;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getSocketIndexesOfServer(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .param p1, "serverId"    # Ljava/lang/String;

    .prologue
    .line 128
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v1, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lrexsee/network/SocketServer;

    .line 129
    .local v0, "server":Lrexsee/network/SocketServer;
    if-nez v0, :cond_0

    const-string v1, "[]"

    .line 130
    :goto_0
    return-object v1

    :cond_0
    invoke-virtual {v0}, Lrexsee/network/SocketServer;->getSockets()Ljava/lang/String;

    move-result-object v1

    goto :goto_0
.end method

.method public getSocketNumberOfServer(Ljava/lang/String;)I
    .locals 2
    .param p1, "serverId"    # Ljava/lang/String;

    .prologue
    .line 123
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v1, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lrexsee/network/SocketServer;

    .line 124
    .local v0, "server":Lrexsee/network/SocketServer;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    .line 125
    :goto_0
    return v1

    :cond_0
    invoke-virtual {v0}, Lrexsee/network/SocketServer;->count()I

    move-result v1

    goto :goto_0
.end method

.method public removeClient()V
    .locals 3

    .prologue
    .line 244
    iget-object v2, p0, Lrexsee/network/RexseeSocket;->mClients:Ljava/util/HashMap;

    invoke-virtual {v2}, Ljava/util/HashMap;->entrySet()Ljava/util/Set;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .line 245
    .local v1, "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Ljava/util/Map$Entry<Ljava/lang/String;Lrexsee/network/SocketClient;>;>;"
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-nez v2, :cond_0

    .line 250
    iget-object v2, p0, Lrexsee/network/RexseeSocket;->mClients:Ljava/util/HashMap;

    invoke-virtual {v2}, Ljava/util/HashMap;->clear()V

    .line 251
    return-void

    .line 246
    :cond_0
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/Map$Entry;

    invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lrexsee/network/SocketClient;

    .line 247
    .local v0, "client":Lrexsee/network/SocketClient;
    invoke-virtual {v0}, Lrexsee/network/SocketClient;->close()V

    goto :goto_0
.end method

.method public removeClient(Ljava/lang/String;)V
    .locals 2
    .param p1, "clientId"    # Ljava/lang/String;

    .prologue
    .line 237
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mClients:Ljava/util/HashMap;

    invoke-virtual {v1, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lrexsee/network/SocketClient;

    .line 238
    .local v0, "client":Lrexsee/network/SocketClient;
    if-nez v0, :cond_0

    .line 242
    :goto_0
    return-void

    .line 239
    :cond_0
    invoke-virtual {v0}, Lrexsee/network/SocketClient;->close()V

    .line 240
    const/4 v0, 0x0

    .line 241
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mClients:Ljava/util/HashMap;

    invoke-virtual {v1, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_0
.end method

.method public removeServer()V
    .locals 3

    .prologue
    .line 228
    iget-object v2, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v2}, Ljava/util/HashMap;->entrySet()Ljava/util/Set;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .line 229
    .local v0, "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Ljava/util/Map$Entry<Ljava/lang/String;Lrexsee/network/SocketServer;>;>;"
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-nez v2, :cond_0

    .line 234
    iget-object v2, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v2}, Ljava/util/HashMap;->clear()V

    .line 235
    return-void

    .line 230
    :cond_0
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/Map$Entry;

    invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lrexsee/network/SocketServer;

    .line 231
    .local v1, "server":Lrexsee/network/SocketServer;
    invoke-virtual {v1}, Lrexsee/network/SocketServer;->close()V

    goto :goto_0
.end method

.method public removeServer(Ljava/lang/String;)V
    .locals 2
    .param p1, "serverId"    # Ljava/lang/String;

    .prologue
    .line 221
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v1, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lrexsee/network/SocketServer;

    .line 222
    .local v0, "server":Lrexsee/network/SocketServer;
    if-nez v0, :cond_0

    .line 226
    :goto_0
    return-void

    .line 223
    :cond_0
    invoke-virtual {v0}, Lrexsee/network/SocketServer;->close()V

    .line 224
    const/4 v0, 0x0

    .line 225
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v1, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_0
.end method

.method public removeSocketFromServer(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 8
    .param p1, "serverId"    # Ljava/lang/String;
    .param p2, "index"    # Ljava/lang/String;

    .prologue
    const-wide/16 v3, -0x1

    const/4 v7, 0x0

    .line 146
    invoke-static {p2, v3, v4}, Lrexsee/core/utilities/Utilities;->getLong(Ljava/lang/String;J)J

    move-result-wide v1

    .line 147
    .local v1, "socketIndex":J
    cmp-long v3, v1, v3

    if-nez v3, :cond_1

    .line 148
    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v3, :cond_0

    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v4

    const-string v5, "Invalid socket index."

    invoke-virtual {v3, v4, v5}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    :cond_0
    move v3, v7

    .line 157
    :goto_0
    return v3

    .line 151
    :cond_1
    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v3, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lrexsee/network/SocketServer;

    .line 152
    .local v0, "server":Lrexsee/network/SocketServer;
    if-nez v0, :cond_3

    .line 153
    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v3, :cond_2

    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v4

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "Server #"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, " is not found."

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    :cond_2
    move v3, v7

    .line 154
    goto :goto_0

    .line 156
    :cond_3
    invoke-virtual {v0, v1, v2}, Lrexsee/network/SocketServer;->remove(J)V

    .line 157
    const/4 v3, 0x1

    goto :goto_0
.end method

.method public removeSocketsFromServer(Ljava/lang/String;)Z
    .locals 5
    .param p1, "serverId"    # Ljava/lang/String;

    .prologue
    .line 160
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v1, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lrexsee/network/SocketServer;

    .line 161
    .local v0, "server":Lrexsee/network/SocketServer;
    if-nez v0, :cond_1

    .line 162
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v2

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "Server #"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " is not found."

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 163
    :cond_0
    const/4 v1, 0x0

    .line 166
    :goto_0
    return v1

    .line 165
    :cond_1
    invoke-virtual {v0}, Lrexsee/network/SocketServer;->remove()V

    .line 166
    const/4 v1, 0x1

    goto :goto_0
.end method

.method public setConnectTimeout(I)V
    .locals 0
    .param p1, "milliseconds"    # I

    .prologue
    .line 98
    iput p1, p0, Lrexsee/network/RexseeSocket;->mConnectTimeout:I

    .line 99
    return-void
.end method

.method public setReadingCycle(I)V
    .locals 0
    .param p1, "milliseconds"    # I

    .prologue
    .line 104
    iput p1, p0, Lrexsee/network/RexseeSocket;->mReadingCycle:I

    .line 105
    return-void
.end method

.method public writeToClient(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 5
    .param p1, "clientId"    # Ljava/lang/String;
    .param p2, "data"    # Ljava/lang/String;

    .prologue
    .line 271
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mClients:Ljava/util/HashMap;

    invoke-virtual {v1, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lrexsee/network/SocketClient;

    .line 272
    .local v0, "client":Lrexsee/network/SocketClient;
    if-nez v0, :cond_1

    .line 273
    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v2

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "Client #"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " is not found."

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 274
    :cond_0
    const/4 v1, 0x0

    .line 276
    :goto_0
    return v1

    :cond_1
    invoke-virtual {p2}, Ljava/lang/String;->getBytes()[B

    move-result-object v1

    invoke-virtual {v0, v1}, Lrexsee/network/SocketClient;->write([B)Z

    move-result v1

    goto :goto_0
.end method

.method public writeToServer(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z
    .locals 8
    .param p1, "serverId"    # Ljava/lang/String;
    .param p2, "index"    # Ljava/lang/String;
    .param p3, "data"    # Ljava/lang/String;

    .prologue
    const-wide/16 v3, -0x1

    const/4 v7, 0x0

    .line 254
    invoke-static {p2, v3, v4}, Lrexsee/core/utilities/Utilities;->getLong(Ljava/lang/String;J)J

    move-result-wide v1

    .line 255
    .local v1, "socketIndex":J
    cmp-long v3, v1, v3

    if-nez v3, :cond_1

    .line 256
    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v3, :cond_0

    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v4

    const-string v5, "Invalid socket index."

    invoke-virtual {v3, v4, v5}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    :cond_0
    move v3, v7

    .line 268
    :goto_0
    return v3

    .line 259
    :cond_1
    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mServers:Ljava/util/HashMap;

    invoke-virtual {v3, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lrexsee/network/SocketServer;

    .line 260
    .local v0, "server":Lrexsee/network/SocketServer;
    if-nez v0, :cond_3

    .line 261
    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v3, :cond_2

    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v4

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "Server #"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, " is not found."

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    :cond_2
    move v3, v7

    .line 262
    goto :goto_0

    .line 264
    :cond_3
    invoke-virtual {v0, v1, v2}, Lrexsee/network/SocketServer;->contains(J)Z

    move-result v3

    if-nez v3, :cond_5

    .line 265
    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v3, :cond_4

    iget-object v3, p0, Lrexsee/network/RexseeSocket;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/network/RexseeSocket;->getInterfaceName()Ljava/lang/String;

    move-result-object v4

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "Socket #"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-static {v1, v2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, " is not found in Server #"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "."

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    :cond_4
    move v3, v7

    .line 266
    goto :goto_0

    .line 268
    :cond_5
    invoke-virtual {p3}, Ljava/lang/String;->getBytes()[B

    move-result-object v3

    invoke-virtual {v0, v1, v2, v3}, Lrexsee/network/SocketServer;->write(J[B)Z

    move-result v3

    goto :goto_0
.end method
